package com.it.oop;

//学生的测试类
public class StudentText {
    public static void main(String[] args) {
        //创建zg学生对象或者是说实例化学生对象
        Student zg = new Student();

        //访问成员变量，并赋值
        zg.name = "张港";
        zg.age = 18;
        zg.className = "java2024";
        zg.student_ID = 1;

        //访问成员方法
        zg.study();
        zg.sayHi();
        zg.playWith("李林");

        System.out.println("----------------");

        //创建ll学生对象或者是说实例化学生对象
        Student ll = new Student();
        //访问成员变量，并赋值
        ll.name = "李林";
        ll.age = 19;
        ll.className = "java2024";
        ll.student_ID = 2;
        //访问成员方法
        ll.study();
        ll.sayHi();
        ll.playWith("张港");

        System.out.println("------------------");
        Student student = new Student("hello", 20, "java2024", 3);
        System.out.println(student.name);
        student.study();
        student.sayHi();
        student.playWith("zg");
    }
}
